<template>
  <div>
    <div class="main">
      <div class="select-box">
        <el-input v-model="filters.key" placeholder="搜索菜谱 例：家常菜">
          <el-button slot="append" @click="getList()">搜索</el-button>
        </el-input>
      </div>
      <div>
        <el-tabs v-model="activeName">
          <el-tab-pane label="热门推荐" name="first">
            <caidan-list :list="list"></caidan-list
          ></el-tab-pane>
          <el-tab-pane label="最新发布" name="second">
            <caidan-list :list="list"></caidan-list
          ></el-tab-pane>
          <el-tab-pane label="本周最热" name="third">
            <caidan-list :list="list"></caidan-list
          ></el-tab-pane>
        </el-tabs>
      </div>
    </div>
  </div>
</template>

<script>
import CaidanList from "./CaidanList.vue";
export default {
  components: { CaidanList },
  data() {
    return {
      list: [1, 2, 3, 4, 5, 6, 7, 8],
      activeName: "first",
      filters: {
        key: "",
      },
    };
  },
  methods: {
    getList() {},
  },
};
</script>

<style lang="less" scoped>
.main {
  width: 960px;
  margin: 0 auto;
  .select-box {
    margin: 20px auto;
    width: 960px;
    .el-button {
      width: 160px;
    }
  }
}
</style>

